<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Constexpr CMath</title>
<link rel="stylesheet" href="../math.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="Math Toolkit 4.2.0">
<link rel="up" href="../special.html" title="Chapter 8. Special Functions">
<link rel="prev" href="daubechies.html" title="Daubechies Wavelets and Scaling Functions">
<link rel="next" href="../extern_c.html" title='Chapter 9. TR1 and C99 external "C" Functions'>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="daubechies.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../special.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../extern_c.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="math_toolkit.ccmath"></a><a class="link" href="ccmath.html" title="Constexpr CMath">Constexpr CMath</a>
</h2></div></div></div>
<h4>
<a name="math_toolkit.ccmath.h0"></a>
      <span class="phrase"><a name="math_toolkit.ccmath.description"></a></span><a class="link" href="ccmath.html#math_toolkit.ccmath.description">Description</a>
    </h4>
<p>
      <code class="computeroutput"><span class="identifier">Constexpr</span></code> implementations of
      the functionality found in <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">cmath</span><span class="special">&gt;</span></code>
      and <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">cstdlib</span><span class="special">&gt;</span></code> <a href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p0533r9.pdf" target="_top">proposed
      for C++23</a>. In a <code class="computeroutput"><span class="keyword">constexpr</span></code>
      context the functions will use an implementation defined in boost. If the context
      is not <code class="computeroutput"><span class="keyword">constexpr</span></code> the functionality
      will be directly from the STL implementation of <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">cmath</span><span class="special">&gt;</span></code>
      used by the compiler. All functions that take an <code class="computeroutput"><span class="identifier">Integer</span></code>
      type and return a <code class="computeroutput"><span class="keyword">double</span></code> simply
      cast the <code class="computeroutput"><span class="identifier">Integer</span></code> argument to
      a <code class="computeroutput"><span class="keyword">double</span></code>. All of the following
      functions require C++17 or greater.
    </p>
<h4>
<a name="math_toolkit.ccmath.h1"></a>
      <span class="phrase"><a name="math_toolkit.ccmath.synopsis"></a></span><a class="link" href="ccmath.html#math_toolkit.ccmath.synopsis">Synopsis</a>
    </h4>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">ccmath</span><span class="special">/</span><span class="identifier">ccmath</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<p>
      namespace boost::math::ccmath {
    </p>
<pre class="programlisting">    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">bool</span> <span class="identifier">isinf</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">);</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">bool</span> <span class="identifier">isnan</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">);</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">sqrt</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">x</span><span class="special">);</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Integer</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">double</span> <span class="identifier">sqrt</span><span class="special">(</span><span class="identifier">Integer</span> <span class="identifier">x</span><span class="special">);</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">T</span> <span class="identifier">abs</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">);</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">enable_if_t</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">is_unsigned_v</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;,</span> <span class="keyword">bool</span><span class="special">&gt;</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">int</span> <span class="identifier">abs</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">);</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">T</span> <span class="identifier">fabs</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">);</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">bool</span> <span class="identifier">isfinite</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">);</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">bool</span> <span class="identifier">isnormal</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">);</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">int</span> <span class="identifier">fpclassify</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">);</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">frexp</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">arg</span><span class="special">,</span> <span class="keyword">int</span><span class="special">*</span> <span class="identifier">exp</span><span class="special">);</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Integer</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">double</span> <span class="identifier">frexp</span><span class="special">(</span><span class="identifier">Integer</span> <span class="identifier">arg</span><span class="special">,</span> <span class="keyword">int</span><span class="special">*</span> <span class="identifier">exp</span><span class="special">);</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">ldexp</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">arg</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">exp</span><span class="special">);</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Integer</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">double</span> <span class="identifier">ldexp</span><span class="special">(</span><span class="identifier">Integer</span> <span class="identifier">arg</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">exp</span><span class="special">);</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Integer</span><span class="special">&gt;</span>
    <span class="keyword">struct</span> <span class="identifier">div_t</span> <span class="special">{</span><span class="identifier">Integer</span> <span class="identifier">quot</span><span class="special">;</span> <span class="identifier">Integer</span> <span class="identifier">rem</span><span class="special">;};</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Integer</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">div_t</span><span class="special">&lt;</span><span class="identifier">Integer</span><span class="special">&gt;</span> <span class="identifier">div</span><span class="special">(</span><span class="identifier">Integer</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Integer</span> <span class="identifier">y</span><span class="special">);</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">logb</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">arg</span><span class="special">);</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Integer</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">double</span> <span class="identifier">logb</span><span class="special">(</span><span class="identifier">Integer</span> <span class="identifier">arg</span><span class="special">);</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">int</span> <span class="identifier">ilogb</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">arg</span><span class="special">);</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">scalbn</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">exp</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Integer</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">double</span> <span class="identifier">scalbn</span><span class="special">(</span><span class="identifier">Integer</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">exp</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">scalbln</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">long</span> <span class="identifier">exp</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Integer</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">double</span> <span class="identifier">scalbln</span><span class="special">(</span><span class="identifier">Integer</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">long</span> <span class="identifier">exp</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">floor</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">arg</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Integer</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">double</span> <span class="identifier">floor</span><span class="special">(</span><span class="identifier">Integer</span> <span class="identifier">arg</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">ceil</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">arg</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Integer</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">double</span> <span class="identifier">ceil</span><span class="special">(</span><span class="identifier">Integer</span> <span class="identifier">arg</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">trunc</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">arg</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Integer</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">double</span> <span class="identifier">trunc</span><span class="special">(</span><span class="identifier">Integer</span> <span class="identifier">arg</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">modf</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Real</span><span class="special">*</span> <span class="identifier">iptr</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">round</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">arg</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Integer</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">double</span> <span class="identifier">round</span><span class="special">(</span><span class="identifier">Integer</span> <span class="identifier">arg</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">long</span> <span class="identifier">lround</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">arg</span><span class="special">)</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">long</span> <span class="keyword">long</span> <span class="identifier">llround</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">arg</span><span class="special">)</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">fmod</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Real</span> <span class="identifier">y</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Arithmetic1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Arithmetic2</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Promoted</span> <span class="identifier">fmod</span><span class="special">(</span><span class="identifier">Arithmetic1</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Arithmetic2</span> <span class="identifier">y</span><span class="special">)</span> <span class="keyword">noexcept</span>
    <span class="identifier">The</span> <span class="identifier">Promoted</span> <span class="keyword">return</span> <span class="identifier">type</span> <span class="identifier">will</span> <span class="identifier">have</span> <span class="identifier">at</span> <span class="identifier">least</span> <span class="keyword">double</span> <span class="identifier">prescision</span><span class="special">,</span> <span class="identifier">but</span> <span class="identifier">be</span> <span class="identifier">up</span> <span class="identifier">to</span> <span class="identifier">the</span> <span class="identifier">highest</span> <span class="identifier">precision</span> <span class="identifier">argument</span><span class="special">.</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">remainder</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Real</span> <span class="identifier">y</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Arithmetic1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Arithmetic2</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Promoted</span> <span class="identifier">remainder</span><span class="special">(</span><span class="identifier">Arithmetic1</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Arithmetic2</span> <span class="identifier">y</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">copysign</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">mag</span><span class="special">,</span> <span class="identifier">Real</span> <span class="identifier">sgn</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Arithmetic1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Arithmetic2</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Promoted</span> <span class="identifier">copysign</span><span class="special">(</span><span class="identifier">Arithmetic1</span> <span class="identifier">mag</span><span class="special">,</span> <span class="identifier">Arithmetic2</span> <span class="identifier">sgn</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">hypot</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Real</span> <span class="identifier">y</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Arithmetic1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Arithmetic2</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Promoted</span> <span class="identifier">hypot</span><span class="special">(</span><span class="identifier">Arithmetic1</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Arithmetic2</span> <span class="identifier">y</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">fdim</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Real</span> <span class="identifier">y</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Arithmetic1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Arithmetic2</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Promoted</span> <span class="identifier">fdim</span><span class="special">(</span><span class="identifier">Arithmetic1</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Arithmetic2</span> <span class="identifier">y</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">fmax</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Real</span> <span class="identifier">y</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Arithmetic1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Arithmetic2</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Promoted</span> <span class="identifier">fmax</span><span class="special">(</span><span class="identifier">Arithmetic1</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Arithmetic2</span> <span class="identifier">y</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">fmin</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Real</span> <span class="identifier">y</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Arithmetic1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Arithmetic2</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Promoted</span> <span class="identifier">fmin</span><span class="special">(</span><span class="identifier">Arithmetic1</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Arithmetic2</span> <span class="identifier">y</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Arithmetic1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Arithmetic2</span> <span class="special">=</span> <span class="identifier">Arithmetic1</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">bool</span> <span class="identifier">isgreater</span><span class="special">(</span><span class="identifier">Arithmetic1</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Arithmetic2</span> <span class="identifier">y</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Arithmetic1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Arithmetic2</span> <span class="special">=</span> <span class="identifier">Arithmetic1</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">bool</span> <span class="identifier">isgreaterequal</span><span class="special">(</span><span class="identifier">Arithmetic1</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Arithmetic2</span> <span class="identifier">y</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Arithmetic1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Arithmetic2</span> <span class="special">=</span> <span class="identifier">Arithmetic1</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">bool</span> <span class="identifier">isless</span><span class="special">(</span><span class="identifier">Arithmetic1</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Arithmetic2</span> <span class="identifier">y</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Arithmetic1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Arithmetic2</span> <span class="special">=</span> <span class="identifier">Arithmetic1</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">bool</span> <span class="identifier">islessequal</span><span class="special">(</span><span class="identifier">Arithmetic1</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Arithmetic2</span> <span class="identifier">y</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keyword">bool</span> <span class="identifier">isunordered</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">y</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Real</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Real</span> <span class="identifier">fma</span><span class="special">(</span><span class="identifier">Real</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Real</span> <span class="identifier">y</span><span class="special">,</span> <span class="identifier">Real</span> <span class="identifier">z</span><span class="special">)</span> <span class="keyword">noexcept</span>
    <span class="identifier">Requires</span> <span class="identifier">compiling</span> <span class="identifier">with</span> <span class="identifier">fma</span> <span class="identifier">flag</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Arithmetic1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Arithmetic2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Arithmetic3</span><span class="special">&gt;</span>
    <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="identifier">Promoted</span> <span class="identifier">fma</span><span class="special">(</span><span class="identifier">Arithmetic1</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">Arithmetic2</span> <span class="identifier">y</span><span class="special">,</span> <span class="identifier">Arithmetic3</span> <span class="identifier">z</span><span class="special">)</span> <span class="keyword">noexcept</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Arithmetic1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Arithmetic2</span><span class="special">&gt;</span>
    <span class="keyword">constexpr</span> <span class="identifier">Promoted</span> <span class="identifier">nextafter</span><span class="special">(</span><span class="identifier">Arithmetic1</span> <span class="identifier">from</span><span class="special">,</span> <span class="identifier">Arithmetic2</span> <span class="identifier">to</span><span class="special">)</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
    <span class="keyword">constexpr</span> <span class="identifier">Promoted</span> <span class="identifier">nexttoward</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">from</span><span class="special">,</span> <span class="keyword">long</span> <span class="keyword">double</span> <span class="identifier">to</span><span class="special">)</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
    <span class="keyword">constexpr</span> <span class="keyword">bool</span> <span class="identifier">signbit</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">arg</span><span class="special">)</span>

<span class="special">}</span> <span class="comment">// Namespaces</span>
</pre>
</div>
<div class="copyright-footer">Copyright © 2006-2021 Nikhar Agrawal, Anton Bikineev, Matthew Borland,
      Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert Holin, Bruno
      Lalande, John Maddock, Evan Miller, Jeremy Murphy, Matthew Pulver, Johan Råde,
      Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg, Daryle
      Walker and Xiaogang Zhang<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="daubechies.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../special.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../extern_c.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
